$var = int(time() * rand());
#print $var."\n";
$dir = "/data1/bsi/BORA_processing/devel/eqtl/parallelize_genotypingsurvival/Matrix_eQTL_R_Source/temp";
system("mkdir $dir/$var");
system("Rscript /data1/bsi/BORA_processing/devel/eqtl/parallelize_genotypingsurvival/Matrix_eQTL_R_Source/rearrange_gene_exp.R $dir/$var");
system("Rscript /data1/bsi/BORA_processing/devel/eqtl/parallelize_genotypingsurvival/Matrix_eQTL_R_Source/Matrix_eQTL_source_cis.R $dir/$var");
system("mv $dir/$var/out.txt /data1/bsi/BORA_processing/devel/eqtl/parallelize_genotypingsurvival/Matrix_eQTL_R_Source/results_permutation/$var.txt");
#system("mv $dir/$var/eQTL_results_R_cis.txt /data1/bsi/BORA_processing/devel/eqtl/parallelize_genotypingsurvival/Matrix_eQTL_R_Source/results_permutation/results_$var.txt");
system("mv  $dir/$var/order.txt /data1/bsi/BORA_processing/devel/eqtl/parallelize_genotypingsurvival/Matrix_eQTL_R_Source/results_permutation/order_$var.txt");
system("rm $dir/$var/*");
system("rmdir $dir/$var");

